﻿@model IEnumerable<Prime.Models.Student>

@{
    ViewBag.Title = "Index";
}
<div class="container">

    <h2>Index</h2>

    <p>
        @Html.ActionLink("Create New", "Create")
    </p>
    <table class="table">
        <tr>
            <th>
                @Html.DisplayNameFor(model => model.FirstName)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.LastName)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.Email)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.RegistrationDate)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.DateOfBirth)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.Points)
            </th>
            <th></th>
        </tr>

        @foreach (var item in Model)
        {
            <tr>
                <td>
                    @Html.DisplayFor(modelItem => item.FirstName)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.LastName)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Email)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.RegistrationDate)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.DateOfBirth)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Points)
                </td>
                <td>
                    @Html.ActionLink("Edit", "Edit", new { id = item.UserName }) |
                    @Html.ActionLink("Details", "Details", new { id = item.UserName }) |
                    @Html.ActionLink("Delete", "Delete", new { id = item.UserName })
                </td>
            </tr>
        }

    </table>

</div>
